在线等C#里关于string[ ]的用法
来源:百度知道 编辑:UC知道 时间:2024/05/29 09:04:35
有大虾知道C#里关于string[ ]的用法吗 我不会用C#的
string[] 表示字符串数组
string[] temp = new string[2];
string a = temp[0];
string b = temp[1];
晕 string 怎么成字符串数组了?
他只是个类型 如 int 什么的
string存放 字符串
是不是数组 看你的定义
基类都是object
msdn上肯定有,你想怎么用
string str;
str="hello world";
string[ ]可不就是字符串数组吗,
string 才是一个数据类型呢!
这样用
string [] strName=new string[N];
for(int i=0;i<N;i++)
{
.....
}
应该明白了吧?